<div style='text-align:right;font-size:12px;line-height:18px;color:#559;background:#eee' >
	<span style='cursor:pointer' id='controlStoreUpdatePwdBtn'>修改密码</span>　
	<span style='cursor:pointer' onclick='_accountExit()'>账号退出</span>
</div>

<!--商户信息展示-->
<img src="../Public/Image/base.png" alt="暂无图片" id='StoreMain_Banner' onerror='this.src="../Public/Image/base.png"' style='width:100%;' />


<div id='StoreViewArea'>
	<h2 style='text-align:center'>商户设置</h2>

	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>所属区域：</div>
		<div style='flex:1' id='StoreMain_ViewCity'>xx区</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户名称：</div>
		<div style='flex:1' id='StoreMain_ViewName'>柳河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户状态：</div>
		<div style='flex:1' id='StoreMain_Stat'></div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>联系电话：</div>
		<div style='flex:1' id='StoreMain_ViewPhone'>13844552257</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户Q Q：</div>
		<div style='flex:1'  id='StoreMain_ViewQq'>32906802</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户微信：</div>
		<div style='flex:1' id='StoreMain_ViewWx'>lhhlly</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户地址：</div>
		<div style='flex:1' id='StoreMain_ViewAddr'>柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户描述：</div>
		<div style='flex:1;word-break:break-all' id='StoreMain_ViewInfo'>柳河亨利河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油粮油</div>
	</div>
	<div style='text-align:center;margin:20px auto'>
		<button  id='StoreMain_EditBtn'>编辑</button>
	</div>
</div>



<div id='StoreMain_StoreEdit'></div>


<div id='StoreMain_StoreUpdatePwd'></div>


<script>
	//点击修改密码，加载修改密码页
	$('#controlStoreUpdatePwdBtn').click(function(){
		$('.ContentItem').hide();
		if($('#controlStoreUpdatePwd').html().length < 0){
			$('#controlStoreUpdatePwd').show();
		}else{
			Ajax('',function(res){
				$('#controlStoreUpdatePwd').html(res).show();
			},'Template/controlStoreUpdatePwd.html');
		}
	});


	//账号退出
	function _accountExit(){
		sessionStorage.store_user_info = '';
		sessionStorage.store_token1 = '';
		location.replace('index.html');
	}


	//点击编辑 (加载商户编辑页)
	$('#StoreMain_EditBtn').click(function(){
		if(_checkStoreStat() == 'err4'){
			return;
		}
		$('#StoreViewArea').hide();
		if($('#StoreMain_StoreEdit').html().length > 0){
			$('#StoreMain_StoreEdit').show();
			StoreEdit_PasrseStoreInfo(sessionStorage.StoreInfo);	//解析并显示商户信息
		}else{
			Ajax('',function(res){
				$('#StoreMain_StoreEdit').html(res).show();
			},'Template/controlStoreEdit.html');
		}
	});




	StoreMain_PasrseStoreInfo(accountInfo);	//解析并显示商户信息

	//解析并显示商户信息
	function StoreMain_PasrseStoreInfo(res){
		$('#StoreViewArea').show();
		$('#StoreMain_StoreEdit').hide(); //隐藏编辑区域
		if(typeof(res) != 'object' && res.length < 1){
			return;
		}
		var info = res;
		if(info.banner){
			$('#StoreMain_Banner').attr('src',upyun_shop_img+info.banner+'?a='+Math.random());
		}
		switch(info.stat){
			case 1:case '1':var stat_str='审核中';break;
			case 2:case '2':var stat_str='正常';break;
			case 3:case '3':var stat_str='未通过';break;
			case 4:case '4':var stat_str='已封禁';break;
		}
		$('#StoreMain_ViewName').text(ChangeChar(info.name,1));
		$('#StoreMain_ViewPhone').text(info.phone);
		$('#StoreMain_ViewQq').text(info.qq);
		$('#StoreMain_ViewWx').text(info.wx);
		$('#StoreMain_ViewAddr').text(ChangeChar(info.addr,1));
		$('#StoreMain_ViewInfo').text(ChangeChar(info.info,1));
		$('#StoreMain_ViewStat').text(stat_str);
		$('#StoreMain_ViewCity').text(cityInfo[3]);

		switch(info.stat){
			case '1':case 1:var statStr='待审核';break;
			case '2':case 2:var statStr='正常';break;
			case '3':case 3:var statStr='未通过';break;
			case '4':case 4:var statStr='封禁';break;
		}
		$('#StoreMain_Stat').text(statStr);
	}
</script>